package com.techsoul.admin.controller;

import com.techsoul.common.core.pojo.Result;
import com.techsoul.module.goods.pojo.param.BrandSearchParam;
import com.techsoul.module.goods.service.IBrandService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 品牌 控制器
 *
 * @author liuen
 */
@Api(tags = "品牌")
@RestController
@RequestMapping("/api/brand")
public class SingleBrandController {

    @Autowired
    private Result result;

    @Autowired
    private IBrandService brandService;

    @ApiOperation("品牌列表")
    @PostMapping("/search")
    public Result ownerBrandList(@RequestBody BrandSearchParam params) {
        return result.success(this.brandService.findAll(params));
    }

}
